Changes the LearnerAssignmentState of a learner assignment.
Parent Type: SlkStore
Namespace: Microsoft.SharePointLearningKit
Assembly: Microsoft.SharePointLearningKit.dll
| C# |
|
public void ChangeLearnerAssignmentState ( ) |
learnerAssignmentId
The ID of the learner assignment to change the LearnerAssignmentState of.
newStatus
The LearnerAssignmentState to transition this learner assignment to. See Remarks for more information.
true if the state transition succeeded, false if the state transition failed because that state transition is not supported. If any other error occurs while performing this operation, an exception is thrown.
| Exception type | Condition |
| InvalidOperationException | The requested state transition is not supported. |
| SafeToDisplayException | An error occurred that can be displayed to a browser user. Possible cause: the user doesn't have the right to switch to the requested state. |
Only the following state transitions are supported by this method:
Active to Completed. This "submits" (learner gives assignment back to instructor) or "collects" (instructor takes assignment back from learner) or "marks as complete" (learner record a learner-created assignment as complete) a learner assignment. This transition may be performed by the instructor of the assignment or the learner who owns this learner assignment. Note that if AssignmentProperties.AutoReturn is true for this assignment, this state transition will automatically cause a second transition, from Completed to Final Completed to Final. This "returns" the assignment from the instructor to the learner -- in this case the user must be an instructor on the assignment. This state transition may also be performed in the case where the instructor caused AssignmentProperties.AutoReturn to be set to true after this assignment transitioned from Active to Completed state -- in this case ("auto-return") the user may be either an instructor of the assignment or the learner who owns this learner assignment. Completed or Final to Active. This "reactivates" the assignment, so that the learner may once again work on it. Active to Final, equivalent to Active to Completed followed by Completed to Final.NotStarted to Active, Completed, or Final, equivalent to beginning the learner assignment and then transitioning states as described above.Security: Fails if the current user doesn't have the right to switch to the requested state.